package com.zx.idc.backend.gui.scheduler.report.illegalmedia;


import com.zx.idc.ds.report.rillegalmedia.service.IRIllegalMediaWeekService;
import org.quartz.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * 非法多媒体统计--周报Job
 * 注意：由于数据源依赖关系的存在， 违法多媒体统计job 应该配置发生在 <新的url爬虫job> job之后
 */
@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class RIllegalMediaWeekJob implements Job {

    private static final Logger LOG = LoggerFactory.getLogger(RIllegalMediaWeekJob.class);
    @Autowired
    private IRIllegalMediaWeekService illegalMediaWeekService;

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        LOG.info("Aggregate illegal media weekly report start...");
        illegalMediaWeekService.aggregate();
        LOG.info("Aggregate illegal media weekly report done.");
    }

}
